%% @author oberfreak
%% @doc @todo Add description to erlChess_test.


-module(erlChess_test).
-include_lib("eunit/include/eunit.hrl").

%% ====================================================================
%% API functions
%% ====================================================================
-export([test_mfa/1, wait_mfa/1]).

start_test_() ->
    {"It should be possible to start a pool server and give it a name",
     {setup,
      fun find_unique_name/0,
      fun(Name) ->
        [start_and_test_name(Name)]
      end}}.


%% ====================================================================
%% Internal functions
%% ====================================================================


%% Exported Helper functions
test_mfa(Pid) ->
    Pid ! i_am_running.

wait_mfa(Pid) ->
    Pid ! i_am_running,
    timer:sleep(3000).